﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Kikooland.Core
{
    public class RectangleEx
    {
        private double x;
        private double y;
        private double width;
        private double height;

        public int X
        {
            get { return Convert.ToInt32(x); }
            set { x = value; }
        }

        public int Y
        {
            get { return Convert.ToInt32(y); }
            set { y = value; }
        }

        public int Width
        {
            get { return Convert.ToInt32(width); }
            set { width = value; }
        }

        public int Height
        {
            get { return Convert.ToInt32(height); }
            set { height = value; }
        }

        public RectangleEx(double X, double Y, double Width, double Height)
        {
            this.x = X;
            this.y = Y;
            this.width = Width;
            this.height = Height;
        }

        public Rectangle ToRectangle()
        {
            return new Rectangle(this.X, this.Y, this.Width, this.Height);
        }

        public void Translation(RectangleEx delta)
        {
            this.x += delta.x;
            this.y += delta.y;
            this.width += delta.width;
            this.height += delta.height;
        }
    }
}
